﻿import request from '/@/utils/request';
enum Api {
  AddEtQuestionBank = '/api/etQuestionBank/add',
  DeleteEtQuestionBank = '/api/etQuestionBank/delete',
  UpdateEtQuestionBank = '/api/etQuestionBank/update',
  PageEtQuestionBank = '/api/etQuestionBank/page',
  DetailEtQuestionBank = '/api/etQuestionBank/detail',
}

// 增加题库表
export const addEtQuestionBank = (params?: any) =>
	request({
		url: Api.AddEtQuestionBank,
		method: 'post',
		data: params,
	});

// 删除题库表
export const deleteEtQuestionBank = (params?: any) => 
	request({
			url: Api.DeleteEtQuestionBank,
			method: 'post',
			data: params,
		});

// 编辑题库表
export const updateEtQuestionBank = (params?: any) => 
	request({
			url: Api.UpdateEtQuestionBank,
			method: 'post',
			data: params,
		});

// 分页查询题库表
export const pageEtQuestionBank = (params?: any) => 
	request({
			url: Api.PageEtQuestionBank,
			method: 'post',
			headers: {
				'Content-Type': 'application/json;charset=UTF-8'
			},
			data: params,
		});

// 详情题库表
export const detailEtQuestionBank = (id: any) => 
	request({
			url: Api.DetailEtQuestionBank,
			method: 'get',
			data: { id },
		});

// 获取题库列表
export const getEtQuestionBankList = (params?: {
  page?: number;
  pageSize?: number;
  searchKey?: string;
}) => pageEtQuestionBank(params);


